﻿<script type="text/mustache-template" id="MyCartTemplate">
    <div id="MyCart" class='cart'>
        {{>header}}
        <div class="scroll-wrapper" id="MyCartWrapper">
            <div class="scroll-inner">
                <div class="blank"></div>
                <div id='cartContent'>
                    
                </div>
            {{>footer}}
            </div>
        </div>
    </div>
</script>

<script type="text/mustache-template" id="CartContentTemplate">
    {{#hasCart}}
        {{>cartTemplate}}
    {{/hasCart}}
    {{^hasCart}}
        {{>emptyCartTemplate}}
    {{/hasCart}}
</script>

<script type="text/mustache-template" id="EmptyCartTemplate">
    <div class="title">购物车</div>
    <div class="content">
        <img src="/Content/Images/empty.png" style="padding-top:1px;">
        <br><br>
        <p>购物车还是空的，快去购物吧~!</p>
        <a class="btn" style="margin:50px 0px;" id="goShopping">继续购物</a>
    </div>
</script>

<script type="text/mustache-template" id="NoEmptyCartTemplate">
    <div class="title"><span id="cart_totalnum">{{count}}</span>件商品：</div>
    <div class="cartList">
        {{#mycarts}}
            <ul>
                <li productid='{{ProductGuid}}' originalnumber={{BuyNumber}}>
                    <div class='clear'>
                        <div class="p-img fl"><a><img width="50" src="/Content/Images/product/demo_small.jpg"></a></div>
                        <div class="">
                            <p class="p-name"><a>{{Name}}</a></p>
                            <p class="p-num gray">编号：{{RepertoryNumber}}</p>
                            <p class="p-price">shopNum1价：<span class='red'>￥<span class='pro-price'>{{BuyPrice}}</span></span>，
                            比市场价：<span class='gray'>￥<span class='market-price'>{{MarketPrice}}</span></span>
                            节省了<span class='gray'>￥<span class='diff-price gray'>{{DiffPrice}}</span></span></p>
                            <p class="p-amount">数量：
                                <a class="redu" style="cursor:pointer">-</a>
                                <input type="text" size="4" value="{{BuyNumber}}" name="num" id="" class="common-input productcount">
                                <a class="add" style="cursor:pointer"">+</a>
                                <a class="btn delete" style="margin-left:15px">删除</a>
                            </p>
                        </div>
                    </div>
                </li>
            </ul>
        {{/mycarts}}
    </div>
    <div class="pay-tip">
        <p class="common-border">原始金额：￥<span id="cart_oriPrice">{{allPrice}}</span>- 返现：￥<span id="cart_rePrice">0.0</span></p>       
        <p>实际金额：<span class="red">￥<span id="cart_realPrice">{{allPrice}}</span></span></p>
    </div>
    <input type="submit" value="去结算" class="ui-button" id="ordering">
    <div class='backShopping pointer'>
        <span></span>继续购物
    </div>
</script>
